-
-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removed temp files once they are no longer needed from hubble and xmm #2465
Removed temp files once they are no longer needed from hubble and xmm #2465
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2465 +/- ##
=======================================
Coverage 62.92% 62.92%
=======================================
Files 133 133
Lines 17302 17302
=======================================
Hits 10888 10888
Misses 6414 6414 📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, though probably it is safer (in the future?) to use tempfile/tempdir machinery for this?
With the proposed solution files will only be cleaned up if the tests don't fail. It would be better to use the pytest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use the tempdir solution the other modules also use, it's more resilient for various testing scenarios.
tempdir approach is more robust and is needed
Dear @bsipocz, I have added the changes that you have requested. Let me know if there are any more changes that are needed. Many thanks, Javier |
parameters = {'observation_id': "J6FL25S4Q", | ||
'cal_level': "RAW", | ||
'filename': "J6FL25S4Q.vot.test", | ||
'filename': tempdir + "/" + "J6FL25S4Q.vot.test", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work on Windows as intended or will /
be interpreted as a part of the file name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually windows will automatically correct to a backslash if a forward slash is detected but sometimes this is not the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll directly add a commit that changes this to os.path.join
, and will go ahead and merge it then rather than go into more rounds.
Thanks @javier-ballester!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are still a few files showing up once the tests are run, I'll see whether I can patch it really quick and get this merged.
6fa74ba
to
ae9de56
Compare
OK, so let's go ahead and merge this. The remote tests are still generating files, but for those, the download data functionality may need to be patched instead (or making the esa code such as a donwload/save dir can be specified rather than rely on the logic that everything gets dumped into the working directory). |
Thanks @javier-ballester! |
Dear Astroquery,
These changes have been made to fix issue #2107. Please let me know if any further changes are needed to fix this issue.
Many thanks,
Javier